<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <div>
        <form id="form1" lay-filter="form1" class="layui-form" action="">
            <input type="hidden" name="id">
            <div class="layui-form-item">
                <label class="layui-form-label">策略名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="name" autocomplete="off" placeholder="策略名称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属年级：</label>
                <div class="layui-input-block">
                    <select name="grade2" id="grade2">
                        <option value="-1">全部</option>
                        <c:forEach items="${gradeList}" var="grade">
                            <option value="${grade.id}">${grade.gradeName}</option>
                        </c:forEach>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否公开：</label>
                <div class="layui-input-block">
                    <input type="radio" name="state" value="是" title="是" checked>
                    <input type="radio" name="state" value="否" title="否">
                </div>
            </div>
        </form>
    </div>
<script>
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>
